Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various cleanup #432

Merged
merged 4 commits into from
Aug 11, 2015
Merged

Various cleanup #432

merged 4 commits into from
Aug 11, 2015

Conversation

dcousens
Copy link
Contributor

Tiny bit of clean up.
Going to merge, @jprichardson feel free to review post merge.

@@ -71,7 +71,7 @@ ECSignature.parseScriptSignature = function (buffer) {
var hashType = buffer.readUInt8(buffer.length - 1)
var hashTypeMod = hashType & ~0x80

assert(hashTypeMod > 0x00 && hashTypeMod < 0x04, 'Invalid hashType ' + hashType)
if (hashTypeMod <= 0x00 || hashTypeMod >= 0x04) throw new Error('Invalid hashType ' + hashType)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving away from assert as the string warning messages always get evaluated, which has lead to various performance issues in the past.
It was nice while it lasted.

dcousens added a commit that referenced this pull request Aug 11, 2015
@dcousens dcousens merged commit 0c8c0e3 into master Aug 11, 2015
@dcousens dcousens deleted the various branch August 11, 2015 06:50
@weilu
Copy link
Contributor

weilu commented Aug 17, 2015

ACK

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants